const http = uni.$u.http

export const createGrabOrder = (data) => http.post('/grabOrder/create', data,{custom: {auth: true, lang: 'java'}})
export const activityCreate = (id) => http.post('/activity/create/' + id, null,{custom: {auth: true, lang: 'java'}})
export const payGrabOrder = (data) => http.post('/grabOrder/pay', data, {custom: {auth: true, lang: 'java'}})
export const userLogin = (data) => http.post('/user/into', data, {custom: {auth: true, lang: 'java'}})
export const getCode = (data) => http.post('/captcha/send', data, {custom: {auth: true, lang: 'java'}})
export const realApi = (data) => http.post('/user/real', data, {custom: {auth: true, lang: 'java'}})
export const getUnionPay = (data) => http.post("/grabOrder/unionPay", data, {custom: {auth: true, lang: 'java'}})
export const pvProduct = (id => http.get("/pv/product/" + id, {custom: {toast: false, lang: 'java'}}))
export const unionWechatPay = (data) => http.post("/order/unionPay", data,{custom: {auth: true, lang: 'java'}})
export const wechatOrderPay = (data) => http.post("/order/pay", data, {custom: {auth: true, lang: 'java'}})
export const nativePay = (data) => http.post("/grabOrder/nativePay", data, {custom: {auth: true, lang: 'java'}})
export const grabOrderAliPay = (data) => http.post("/grabOrder/alipay", data, {custom: {auth: true, lang: 'java'}})
export const priorityCreate = (data) => http.post("/grabOrder/priorityCreate", data, {custom: {auth: true, lang: 'java'}})
export const getbarrage = (data) => http.post("/blindBox/barrageList", data, {custom: {auth: true, lang: 'java'}})
export const getissuetbarrage = (data) => http.post("/blindBox/barrageAdd", data, {custom: {auth: true, lang: 'java'}})
export const getOpeningthebox = (data) => http.post("/blindBox/open", data, {custom: {auth: true, lang: 'java'}})
export const getsmokebox = (data) => http.post("/blindBox/add", data, {custom: {auth: true, lang: 'java'}})


export const getPlutusPayGrab = (id, params=null) => http.get("/plutusPay/grabOrder/pay/" + id, {custom: {lang: 'java'}, params})
export const getPlutusPayOrder = (id) => http.get("/plutusPay/order/pay/" + id, {custom: {lang: 'java'}})
export const getUnionWechatPay = (id, params) => http.get("/unionPay/grabOrder/pay/" + id, {custom: {auth: true, lang: 'java'}, params})
export const userWithdraw = (data) => http.post('/userWallet/withdraw', data, {custom: {auth: true, lang: 'java'}})
export const userTopUp = (data) => http.post('/userWallet/topUp', data, {custom: {auth: true, lang: 'java'}})
export const unionTopUp = (id) =>　http.get('/unionPay/topUp/pay/' + id, {custom: {auth: true, lang: 'java'}})
export const submitSell=(data) => http.post('/exchangeOrder/sell', data, {custom: {auth: true, lang: 'java'}})
export const userBuyNft = (data) => http.post('/exchangeOrder/buy', data, {custom: {auth: true, lang: 'java'}})
export const cancelExchangeOrder = (data) => http.post("/exchangeOrder/cancel", data, {custom: {auth: true, lang: 'java'}})
export const setSafePass= (data) => http.post("/user/updateSafePass", data, {custom: {auth: true, lang: 'java'}})
export const plutusPayTopUp = (id) =>　http.get('/plutusPay/topUp/pay/' + id, {custom: {auth: true, lang: 'java'}})
export const getCaptcha = () =>http.post('/captcha/img', null,{custom: {lang: 'java'}})
